<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <!-- 引入vue -->
     <script src="js/vue.js"></script>
     <!-- 引入elementui -->
      <!-- 样式 -->
    <link rel="stylesheet" href="element-ui-2.13.0/lib//theme-chalk/index.css">   
       <!-- 组件库 -->
    <script src="element-ui-2.13.0/lib/index.js"></script>    
</head>
<body>
    <div id="app">
        <template>
           
            <div class="block">
              <span class="demonstration">完整功能</span>

              <!-- 
                :total="1700" 绑定总条数
                :current-page="currentPage4" 显示的当前页
                :page-sizes="[100, 200, 300, 400,500]" 页面可以切换的条数
                :page-size="100"  页面默认显示的条数
                @size-change="handleSizeChange" 条数改变触发的钩子函数
                 @current-change="handleCurrentChange" 当前页改变触发的钩子

                 layout="total, sizes, prev, pager, next, jumper" 组件布局，子组件名用逗号分隔
                    total 总条数
                    sizes 条数切换
                    prev 处理上一页
                    next 处理下一页
                    pager 页面显示的页码数
                    jumper 处理跳页
              -->
              <el-pagination
                @size-change="handleSizeChange"
                @current-change="handleCurrentChange"
                :current-page="currentPage"
                :page-sizes="[100, 200, 300, 400,500]"
                :page-size="200"
                layout="total, sizes, prev, pager, next, jumper"
                :total="1700">
              </el-pagination>
            </div>
          </template>
    </div>
</body>
</html>
<script>
    new Vue({
        el: '#app',
        methods: {
            handleSizeChange(val) {
                //val代表改变的条数
                console.log(`每页 ${val} 条`);
            },
            handleCurrentChange(val) {
                //val代表改变的当前页
                console.log(`当前页: ${val}`);
            }
        },
        data() {
            return {
               
                currentPage: 1
            };
        }
    })
</script>
